package com.yao.mall.constant;

/**
 * @author jiahua.yao
 * @version 1.0
 * @description 常量
 * @date 2024/2/29 16:38
 */
public abstract class UserConstant {
    /**
     * 账号密码登录
     */
    public static final String BY_PASSWORD = "password";

    /**
     * 账号
     */
    public static final String BY_ACCOUNT = "account";
    /**
     * 邮箱登录
     */
    public static final String BY_EMAIL = "mail";
    /**
     * 手机号码登录
     */
    public static final String BY_PHONE = "phone";
    /**
     * 盐值，混淆密码
     */
    public static final String SALT = "salt";
    /**
     * Redis存储登录信息前缀
     */
    public static final String LOGIN_USER_KEY = "login:token:";
    /**
     * 手机号或密码登录
     */
    public static final String VER_CODE = "loginOrRge:verCode:";
    /**
     * 邮箱验证
     */
    public static final String EMAIL_REGEX = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";

    /**
     * 验证码长度
     */
    public static final int CODE_LENGTH = 6;

    /**
     * 验证码长度
     */
    public static final int ACCOUNT_LENGTH = 11;
    /**
     * 电话验证
     */
    public static final String PHONE_REGEX = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$";

    /**
     * 账号前缀
     */

    public static final String PREFIX = "ym";

    /**
     * 默认图片资源
     */
    public static final String PIC = "https://logistics-back-pic.oss-cn-beijing.aliyuncs.com/2023-08-09/1691583032956-pic.png";

    /**
     * 用户最大地址数量
     */
    public static final int MAX_COUNT = 5;
}
